# Copyright 2010-2024 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# ModelBuilder: a lightweight implementation of the linear_solver API

# Public exports.
exports_files(
    [
        "README.md",
        "BUILD.bazel",
        "CMakeLists.txt",
    ] + glob([
        "*.cc",
        "*.h",
    ]),
)

cc_library(
    name = "model_builder_helper",
    srcs = ["model_builder_helper.cc"],
    hdrs = ["model_builder_helper.h"],
    copts = [
        "-DUSE_PDLP",
        "-DUSE_SCIP",
        "-DUSE_LP_PARSER",
    ],
    visibility = ["//visibility:public"],
    deps = [
        "//ortools/base:file",
        "//ortools/linear_solver:linear_solver_cc_proto",
        "//ortools/linear_solver:model_exporter",
        "//ortools/linear_solver:solve_mp_model",
        "//ortools/linear_solver/proto_solver:glop_proto_solver",
        "//ortools/linear_solver/proto_solver:gurobi_proto_solver",
        "//ortools/linear_solver/proto_solver:pdlp_proto_solver",
        "//ortools/linear_solver/proto_solver:sat_proto_solver",
        "//ortools/linear_solver/proto_solver:scip_proto_solver",
        "//ortools/linear_solver/proto_solver:xpress_proto_solver",
        "//ortools/lp_data:lp_parser",
        "//ortools/lp_data:mps_reader",
        "//ortools/util:logging",
        "//ortools/xpress:environment",
    ],
)
